package com.zx.mes.test.hyl.model.singleton;

/**
 * 懒汉模式
 * @author hyl
 * @date 2018-3-28
 */
public class Singleton2 {

    private static Singleton2 singleton2;

    private Singleton2 (){}

    public static synchronized Singleton2 getInstance(){
        if (singleton2 == null) {
            singleton2= new Singleton2();
        }
        return singleton2;
    }
}
